package com.video.moderation.repository;

import com.video.moderation.entity.VideoTagRef;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface VideoTagRefRepository extends JpaRepository<VideoTagRef, String> {
    
    @Query("SELECT vtr.tagId FROM VideoTagRef vtr WHERE vtr.videoId = :videoId ")
    List<String> queryTagIdByVid(@Param("videoId") String videoId);
    
}
